package com.demo.em;


public enum ExceptionEnum {
    CUSTOM_EXCEPTION_ONE("10001","自定义异常1"),
    CUSTOM_EXCEPTION_TWO("10002","自定义异常2"),
    ;

    private String code;
    private String message;

    public String getMessage() {
        if (message == null) {
            return "";
        }
        return message;
    }

    public String getCode() {
        return code;
    }

    ExceptionEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }
}

